
Use NEXUS_DB

GO
--------------------------------------Insert---------------
CREATE PROC insertEquipment
	@EquipmentName nvarchar(255) ,
	@EquipmentAmount int
AS
INSERT INTO  Equipment(EquipmentName,EquipmentAmount) VALUES(@EquipmentName,@EquipmentAmount)

--insertAccount 'da',1,1,1
GO
---------------------------------------------------update-------------------
CREATE PROC updateEquipment
	@EquipmentID int,
	@EquipmentName nvarchar(255) ,
	@EquipmentAmount int
AS
UPDATE Equipment SET	
	EquipmentName =@EquipmentName,
	EquipmentAmount =@EquipmentAmount
WHERE EquipmentID=@EquipmentID

GO
---------------------------------------Delete--------------------

CREATE PROC deleteEquipment
	@EquipmentID int
AS
	DELETE FROM Equipment WHERE EquipmentID=@EquipmentID
GO
------------------------------------Getall
CREATE PROC getAllEquipment
AS
SELECT * from Equipment
GO
-----------------------------getEquipmentByID---------
CREATE PROC getEquipmentByID
	@EquipmentID int
AS
SELECT * from Equipment WHERE EquipmentID=@EquipmentID

